package mercurius.fitness.client.ui.menu.items;

import net.pleso.framework.client.ui.custom.CustomFormWindow;
import net.pleso.framework.client.ui.custom.CustomRBWindow;
import mercurius.fitness.client.rb.diet.Diet;
import mercurius.fitness.client.rb.diet.DietRB;
import mercurius.fitness.client.rb.diet.forms.AddDietForm;

import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.MenuBar;

public class DietMenu extends MenuBar  {
	
	public DietMenu() {
		super(true);
		MenuBar graphsubmenu = new MenuBar(true);
		
		addItem("Diet Log",new Command() {

			public void execute() {
				new CustomRBWindow(new DietRB(Diet.TYPE_LOG)).show();
			}
			
		});
		
		addItem("Nutrition Repository",new Command() {

			public void execute() {
				new CustomRBWindow(new DietRB(Diet.TYPE_PRIVATE_REPOSITORY)).show();
			}
			
		});
		
		addItem("Add to Log",new Command() {

			public void execute() {
				new CustomFormWindow(null,new AddDietForm(Diet.TYPE_LOG)).show();
			}
			
		});
		
		addItem("Add to Repository",new Command() {

			public void execute() {
				new CustomFormWindow(null,new AddDietForm(Diet.TYPE_PRIVATE_REPOSITORY)).show();
			}
			
		});
		
	}
}